package com.greatwqs.wmall.user.provider.common;

import lombok.extern.slf4j.Slf4j;

import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

/**
 * @author wang-qingsong
 */
@Slf4j
@Component
public class RequestComponent {

    /**
     * 获取请求头信息
     *
     * @return
     */
    private ServletRequestAttributes getRequestAttributes() {
        return (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    }

}
